<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <img src="img/guanggao.bmp" alt="广告" />
    <div>05</div>
    <script>
        var num = 5;
        var div = $("div")[0];
        var timer = setInterval(function() {
            num--;

            function $(select) {
                return document.querySelectorAll(select);
            }
            div.innerHTML = "0" + num;
            if (num == 0) {
                clearInterval(timer);
                $("img")[0].style.display = "none";
                div.style.display = "none";
            }
        }, 1000)

        function $(select) {
            return document.querySelectorAll(select);
        }
    </script>

</body>

</html>